#ifndef __BSP_RINGBUFF_H__
#define __BSP_RINGBUFF_H__

#include "stdint.h"
#define	RINGPAGESIZE			128
#define RINGBUFFSIZE 			32

typedef struct _ringBuffPage
{
	uint8_t size;
	void 		*buff;
}ringBuffPage_t;

typedef struct _ringBuffPort
{
	uint8_t length;
	uint8_t head_index;
	uint8_t tail_index;
	
	ringBuffPage_t *(pages)[RINGBUFFSIZE];

}ringBuffPort_t;

void 		ringBuff_init(ringBuffPort_t *Port);
uint8_t ringBuff_noEmpty(ringBuffPort_t *Port);
uint8_t ringBuff_noFull(ringBuffPort_t *Port);
uint8_t ringBuff_enqueue(ringBuffPort_t *Port,void *Data,uint8_t Size);
uint8_t ringBuff_dequeue(ringBuffPort_t *Port,void *Data,uint8_t *Size);


#endif
